360吧[体].js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. globalThis.getVideos = function (link, key) {
  2. let html = request(link);
  3. let json = JSON.parse(html);
  4. let data = json.data;
  5. data = data[key];
  6. let videos = data.map((n) => {
  7. let id = n.url;
  8. let name = n.league_name_zh + ' ' + n.home_team_zh + ' VS ' + n.away_team_zh;
  9. let pic = n.cover;
  10. let remarks = n.nickname;
  11. return {
  12. vod_id: id,
  13. vod_name: name,
  14. vod_pic: pic,
  15. vod_remarks: remarks,
  16. };
  17. });
  18. return videos
  19. }
  20. var rule = {
  21. 类型: '影视',//影视|听书|漫画|小说
  22. title: '360吧[球]',
  23. host: 'https://m.360ba.co/',
  24. homeUrl: '/api/web/h5_index',
  25. url: '/api/web/live_lists/fyclass',
  26. searchUrl: '/api/web/search?keyword=**',
  27. searchable: 2,
  28. quickSearch: 0,
  29. filterable: 0,
  30. headers: {
  31. 'User-Agent': 'MOBILE_UA',
  32. },
  33. timeout: 5000,
  34. class_name: '全部&足球&篮球&综合',
  35. class_url: '1&2&3&99',
  36. play_parse: true,
  37. pagecount: {
  38. "1": 1,
  39. "2": 1,
  40. "3": 1,
  41. "99": 1,
  42. },
  43. lazy: $js.toString(() => {
  44. input = {parse: 0, url: input, header: rule.headers};
  45. }),
  46. 预处理: $js.toString(() => {
  47. Object.assign(rule.headers, {
  48. 'Referer': rule.host,
  49. 'Origin': rule.host,
  50. });
  51. }),
  52. 推荐: $js.toString(() => {
  53. VODS = getVideos(input, 'hot_matches');
  54. }),
  55. 一级: $js.toString(() => {
  56. VODS = [];
  57. if (MY_PAGE <= 1) {
  58. VODS = getVideos(input, 'data');
  59. }
  60. }),
  61. 二级: '*',
  62. 搜索: $js.toString(() => {
  63. VODS = [];
  64. if (MY_PAGE <= 1) {
  65. VODS = getVideos(input, 'ball');
  66. }
  67. }),
  68. }